<template>
  <div>
    <home-header></home-header>
    <home-serch></home-serch>
    <home-List :cities="cities" :hotCities="hotCities"></home-List>
    <home-alpher></home-alpher>
  </div>
</template>

<script>
import HomeHeader from './components/Header.vue'
import HomeSerch from './components/Serch.vue'
import HomeList from './components/List.vue'
import HomeAlpher from './components/Alpher.vue'

export default {
  components: {HomeHeader, HomeSerch, HomeList, HomeAlpher},
  data () {
    return {
      cities: {},
      hotCities: []
    }
  },
  created () {

  },
  mounted () {
    this.getCity()
  },
  methods: {
    getCity () {
      this.$axios('/api/city.json').then(res => {
        if (res.data.ret) {
          this.cities = res.data.data.cities
          this.hotCities = res.data.data.hotCities
        }
      })
    }
  }
}
</script>
<style lang='stylus' scoped>

</style>
